#include <iostream>
using namespace std;
typedef long long ll;
int a[9] = {0};
int main() {
    ll n; cin >> n;
    ll m = 0;
    while (n)
    {
        int x = n % 10;
        if (a[x] == 0)
        {
            a[x]++;
            m = m * 10 + x;
        }
        n /= 10;
    }
    cout << m << endl;
    return 0;
}